1. FIELD OF THE INVENTION
This invention relates to the field of computer software, and, more specifically, to object-oriented applications.
Portions of the disclosure of this patent document contain material that is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document or the patent disclosure as it appears in the Patent and Trademark Office file or records, but otherwise reserves all copyright rights whatsoever. Sun, Sun Microsystems, the Sun logo, SPARC, Java, JavaBeans and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries.
2. BACKGROUND ART
In the computer industry, an application architecture that is becoming more widely used, particularly in the Internet environment, is the three-tier application architecture, or three-tier architecture. In this architecture, a client communicates requests to a server for data, software and services, for example, and the server responds to the requests which may entail communication with a database management system for the storage and retrieval of persistent data. The three tier architecture includes a database tier that includes a database server, an application tier that includes an application server and application logic (i.e., software application programs, functions, etc.), and a client tier. The application server responds to application requests (e.g., a request for a software applet, etc.) received from the client. The application server forwards data requests to the database server. An enterprise""s application (e.g., a scheduling, accounting or personnel application) may involve all three tiers as data that is used by the application may be stored in a database.
Enterprise applications often consist of displaying data to a user and allowing the user to modify that data. In a multi-tier application, multiple users may each access the application and the enterprise data at the same time. It is desirable that each user be able to see the effects of his or her own modifications in near real time. It is also desirable that the effects of other users""modifications, as well as those modifications performed by the application itself (e.g., time-based changes), be made evident to each user in near real time. For this to happen, many disparate components of the application, across multiple tiers, need to know when data changes. However, typically, an application component is unaware of data changes until the application component next performs a data access, at which time the application component might determine what changes have been made since the last data access operation. There is no mechanism for achieving near real time notification of changes across multiple tiers.
An overview of a multi-tier architecture is described below with reference to FIG. 2. In the three-tier architecture illustrated in FIG. 2, client tier 202 typically consists of a computer system that provides a graphic user interface (GUI) generated by a client 206, such as a browser or other user interface application. Client 206 generates a display from, for example, a specification of GUI elements (e.g., a file containing input, form, and text elements defined using the Hypertext Markup Language (HTML)) and/or from an applet (i.e., a program such as a program written using the Java(trademark) programming language that runs when it is loaded by the browser).
Further application functionality is provided by application logic managed by application server 210 in application tier 216. The apportionment of application functionality between client tier 202 and application tier 216 is dependent upon whether a xe2x80x9cthin clientxe2x80x9d or xe2x80x9cthick clientxe2x80x9d topology is desired. Database tier 218 contains the data that is accessed by the application logic in application tier 216. Database server 212 manages the data, its structure and the operations that can be performed on the data and/or its structure.
Application server 210 can include applications such as a corporation""s scheduling, accounting, personnel and payroll applications, for example. Application server 210 manages requests for the applications that are stored therein. Application server 210 can also manage the storage and dissemination of production versions of enterprise application logic (i.e., the versions that are currently being used by the corporate users). Database server 212 manages the database(s) that manage data for applications. Database server 212 responds to requests to access the scheduling, accounting, personnel and payroll applications""data, for example.
Connection 204 is used to transmit enterprise data between client tier 202 and application tier 216, and may also be used to transfer the enterprise application logic to client tier 202. The client tier can communicate with the application tier via, for example, a Remote Method Invocator (RMI) application programming interface (API) available from Sun Microsystems(trademark). The RMI API provides the ability to invoke methods, or software modules, that reside on another computer system. Parameters are packaged and unpackaged for transmittal to and from the client tier. Connection 214 between application server 210 and database server 212 represents the transmission of requests for data and the responses to such requests from applications that reside in application server 210.
Elements of the client tier, application tier and database tier (e.g., client 206, application server 210 and database server 212) may execute within a single computer. However, in a typical system, elements of the client tier, application tier and database tier may execute within separate computers interconnected over a network such as a LAN (local area network) or WAN (wide area network).
A method and apparatus of performing active update notification is described. Components of an application are able to specify interest in a data object or set of data objects by registering an interest object with an update management component of the application. The interest object specifies the interested application component, as well as the identity of one or more data objects or an attribute value or range of values to associate with data objects. When modifications are made to data objects corresponding to the registered interest objects, the interested application component or components receive an update notification from the update management component.
In one embodiment, active update notification is performed within a multi-tier application. An update management component exists at the application server on the application tier, as well as at each client in the client tier. In the application tier, the update management component maintains, with respect to clients and servers, a registry of interest objects of sufficient depth to determine which clients or other servers may be interested in changes to data objects. Update notifications are then sent only to the interested clients or servers. The interest registry of the update management component in the interested client is used to resolve the interested application component, and to forward the update notification appropriately.
Interest objects are provided that allow interests to be registered for individual data objects or sets of data objects. Interests may be further refined by registering other interest objects as sub-interests of existing interest objects to build an interest hierarchy within the registry. Interested components, also referred to as xe2x80x9cobservers,xe2x80x9d may be registered for each interest object in the hierarchy to receive notification of updates. A further interest object collects data objects that are part of a changed set, either through addition, removal or update, to allow an interested component to access those collected data objects after receipt of an update notification.